550 5.7.1 Unable to relaybut  only when sending mail with php-mail
Hi When ever I want to send a PHP Formular with the PHP-Mail to a external E-Mail address, I get the error: 550 5.7.1 Unable to relay My system: -Windows Server 2008 R2 -Exchange 2010 -Forefront Server Protection -PHP 5.2.5 -If I send the filled out formular to a internal address, all works fine -Sending E-Mail to internal and external E-Mail Addresses with Outlook works fine I tried to check if it can be, that something is wrong with the "Formular-Mail-Header" and created a new accepted domain "*" in Microsoft Exchange -> Organization Configuration -> Hub Transport -> Accepted Domains and used "Internal Relay Domain". (ok, I know that this is then an open relay, but I did it only for a few minutes testing) Result: I was able to send this Mail to all (internal and external) mail addresses. This is the entry in the "SmtpReceive Log": 2010-09-19T07:41:57.215Z,JUPITER\Test,08CD25DB67E2B893,0,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,+,, 2010-09-19T07:41:57.215Z,JUPITER\Test,08CD25DB67E2B893,1,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,*,SMTPSubmit SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions 2010-09-19T07:41:57.215Z,JUPITER\Test,08CD25DB67E2B893,2,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,"220 Jupiter.huber.ch Microsoft ESMTP MAIL Service ready at Sun, 19 Sep 2010 09:41:56 +0200", 2010-09-19T07:41:57.215Z,JUPITER\Test,08CD25DB67E2B893,3,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,<,HELO Jupiter, 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,4,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,250 Jupiter.huber.ch Hello [150.109.xxx.xxx], 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,5,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,<,MAIL FROM:<contact@mydomain.ch>, 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,6,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,*,08CD25DB67E2B893;2010-09-19T07:41:57.215Z;1,receiving message 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,7,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,250 2.1.0 Sender OK, 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,8,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,<,RCPT TO:<first.lastname@externaldomain.com>, 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,9,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,250 2.1.5 Recipient OK, 2010-09-19T07:41:57.216Z,JUPITER\Test,08CD25DB67E2B893,10,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,<,DATA, 2010-09-19T07:41:57.217Z,JUPITER\Test,08CD25DB67E2B893,11,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,354 Start mail input; end with <CRLF>.<CRLF>, 2010-09-19T07:41:59.359Z,JUPITER\Test,08CD25DB67E2B893,12,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,*,Tarpit for '0.00:00:02.539' due to 'DelayedAck',Delivered 2010-09-19T07:41:59.359Z,JUPITER\Test,08CD25DB67E2B893,13,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,250 2.6.0 <67c59047-f3ee-4f91-86e8-b906e4ef5780@Jupiter.huber.ch> [InternalId=59] Queued mail for delivery, 2010-09-19T07:41:59.359Z,JUPITER\Test,08CD25DB67E2B893,14,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,<,QUIT, 2010-09-19T07:41:59.360Z,JUPITER\Test,08CD25DB67E2B893,15,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,>,221 2.0.0 Service closing transmission channel, 2010-09-19T07:41:59.360Z,JUPITER\Test,08CD25DB67E2B893,16,150.109.xxx.xxx:25,150.109.xxx.xxx:17102,-,,Local Nb. the ip: 150.109.xxx.xxx is my "internal ip-address", external the address is 62.167.xxx.xxx From my point of view, this is the "evidence" that the PHP Formular, Headers and PHP Configuration is correct. Ok, when I have a accepted domain * then I'm able the send/receive to/from all domains and from Outlook ans PHP. Then I deleted this "open relay", because this was only used for testing :-) And now I tried to send to the same mail address and this is the log: 2010-09-19T07:40:26.730Z,JUPITER\Test,08CD25DB67E2B88E,0,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,+,, 2010-09-19T07:40:26.730Z,JUPITER\Test,08CD25DB67E2B88E,1,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,*,SMTPSubmit SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions 2010-09-19T07:40:26.730Z,JUPITER\Test,08CD25DB67E2B88E,2,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,>,"220 Jupiter.huber.ch Microsoft ESMTP MAIL Service ready at Sun, 19 Sep 2010 09:40:25 +0200", 2010-09-19T07:40:26.730Z,JUPITER\Test,08CD25DB67E2B88E,3,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,<,HELO Jupiter, 2010-09-19T07:40:26.730Z,JUPITER\Test,08CD25DB67E2B88E,4,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,>,250 Jupiter.huber.ch Hello [150.109.xxx.xxx], 2010-09-19T07:40:26.731Z,JUPITER\Test,08CD25DB67E2B88E,5,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,<,MAIL FROM:<contact@mydomain.ch>, 2010-09-19T07:40:26.731Z,JUPITER\Test,08CD25DB67E2B88E,6,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,*,08CD25DB67E2B88E;2010-09-19T07:40:26.730Z;1,receiving message 2010-09-19T07:40:26.731Z,JUPITER\Test,08CD25DB67E2B88E,7,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,>,250 2.1.0 Sender OK, 2010-09-19T07:40:26.731Z,JUPITER\Test,08CD25DB67E2B88E,8,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,<,RCPT TO:<first-lastname@externaldomain.com>, 2010-09-19T07:40:26.731Z,JUPITER\Test,08CD25DB67E2B88E,9,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,*,Tarpit for '0.00:00:05', 2010-09-19T07:40:31.745Z,JUPITER\Test,08CD25DB67E2B88E,10,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,>,550 5.7.1 Unable to relay, 2010-09-19T07:40:31.745Z,JUPITER\Test,08CD25DB67E2B88E,11,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,<,QUIT, 2010-09-19T07:40:31.745Z,JUPITER\Test,08CD25DB67E2B88E,12,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,>,221 2.0.0 Service closing transmission channel, 2010-09-19T07:40:31.745Z,JUPITER\Test,08CD25DB67E2B88E,13,150.109.xxx.xxx:25,150.109.xxx.xxx:17061,-,,Local Without a accepted domain "*" the sending to external domains is not possible, if I send the same formular (with the same sender) to a internal address, then it works! Has somebody a idea how I can solve this and why it's not possible (so far) to send mails to external domains? Any help is appreciated, thanks a lot for support. with kind regards Markus
September 19th, 2010 4:16pm

On Sun, 19 Sep 2010 20:13:08 +0000, hubemar wrote: >Hi When ever I want to send a PHP Formular with the PHP-Mail to a external E-Mail address, I get the error: 550 5.7.1 Unable to relay My system: -Windows Server 2008 R2 -Exchange 2010 -Forefront Server Protection -PHP 5.2.5 -If I send the filled out formular to a internal address, all works fine -Sending E-Mail to internal and external E-Mail Addresses with Outlook works fine I tried to check if it can be, that something is wrong with the "Formular-Mail-Header" and created a new accepted domain "*" in Microsoft Exchange -> Organization Configuration -> Hub Transport -> Accepted Domains and used "Internal Relay Domain". (ok, I know that this is then an open relay, but I did it only for a few minutes testing) Result: I was able to send this Mail to all (internal and external) mail addresses. The default security on Exchange is to prevent anonymous connections from sending to any but you accepted domains. If your receive connector allows authenticated connections to use it as a SMTP relay then you can have your application authenticate with the receive connector. As an alternative, you can create another receive connector and configure it to accept e-mail to any domain. Then use the new recive connector in your application. http://technet.microsoft.com/en-us/library/bb232021(EXCHG.80).aspx http://exchangepedia.com/2007/01/exchange-server-2007-how-to-allow-relaying.html --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
September 19th, 2010 5:20pm

Hi Rich You made my day! Now it works. I used Scott Landry's "way" to solve it (link: http://msexchangeteam.com/archive/2006/12/28/432013.aspx ), he wrote this recently on the Exchange team blog. I found this link on your recommeded link: http://exchangepedia.com/2007/01/exchange-server-2007-how-to-allow-relaying.html . Once again, thank you very much! with kind regards Markus
September 20th, 2010 5:23pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics